package com.atguigu.day10;

public class Test09 {
    public static void main(String[] args) {
        A a = new C();
        a.showA();
        B b = new C();
        b.showB();
        C c = new C();
        c.showC();
        c.showA();
        c.showB();
    }
}
abstract class A{
    int numa = 10;
    abstract void showA();
}
abstract class B  extends A{
    int numb = 20;
    abstract void showB();
}
class C extends B{
    int numc = 30;

    @Override
    void showA() {
        System.out.println("A类中numa:"+numa);
    }

    @Override
    void showB() {
        System.out.println("B类中numb:"+numb);
    }
    void showC(){
        System.out.println("C类中numc:"+numc);
    }
}